<h1> Orders Manage </h1>
<?php require_once 'CMS/Util.php';
$dateInt = new Util();?>

<div class="breadcrumb">
        <a href="/admin/index">Home</a>
         :: <a href="/admin/bill">Orders</a>
</div>
<div class="box">
 <div class="heading">
      <h1><img alt="" src="/images/admin/order.png"> Orders</h1>
    </div>
    <div class="content">
      <table class="list">
     <?php if(isset($this->AllBills) && $this->AllBills!=null) { 
?>
        <thead>
          <tr>
          <td class="center">No</td>
            <td class="center">Customer Name</td>
            <td class="center">Status</td>
            <td class="center">Date</td>
            
            <td class="center">Total Price</td>
            <td class="center">Action</td>
          </tr>
        </thead>
        <tbody>
         <?php $i=0;
		foreach ($this->AllBills as $bill) { $i++;?>
          <tr>
          <td class="center"><?php echo $i;?></td>
            <td class="left"><?php  echo $bill["full_name"];?></td>
             <td class="left"><?php  echo $bill["status_name"];?></td>
             <?php $Update_Date=$dateInt->makeDays($bill["updated_date"]); ?>
           <td class="center"><?php  echo $Update_Date;?></td>
           <td class="left"><?php  echo number_format($bill["total_bill_price"]);?> VNĐ</td>
            <td class="center">
             [ <a href = "/admin/billdetail?id=<?php echo $bill["bill_id"];?>" >Update</a> ]
           
              </td>
          </tr>
          <?php }?>
                    
       </tbody>
       <?php } else {?>
        <div style="text-align: center;padding-top:100px;">No Orders </div>
       <?php }?>
      </table>
    </div>
  </div>
